package com.guaoran.solr;


import com.guaoran.mybatis.bean.Dept;
import org.apache.ibatis.annotations.*;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author : guCheng
 * @title : DeptMapper 
 * @Description : 
 * 	 
 * @date :2017年12月13日下午10:49:51
 */
@Mapper
public interface ArticleMapper {
	/**
	 * 增加
	 * @param article
	 */
	@Insert("insert into article(category_id,author_id,name,content,create_time) values(" +
			"#{categoryId},#{authorId},#{name},#{content},now())")
	public void insertArticleByObject(Article article);


	/**
	 * 查询
	 * @return
	 */
	@Select("select * from article limit 0,10  ")
	@Results({
			@Result(column = "id",property = "id"),
			@Result(column = "name",property = "name"),
			@Result(column = "category_id",property = "categoryId"),
			@Result(column = "create_time",property = "createTime"),
			@Result(column = "author_id",property = "authorId"),
			@Result(column = "content",property = "content")
	})
	public List<Article> queryArticle();


}
